package com.example.happiness.mapper;

import com.example.happiness.pojo.Employee;
import com.example.happiness.pojo.adminvo.AdminMangeEmployVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface EmployeeMapper {
    int deleteByPrimaryKey(String employeeid);

    int insert(Employee record);

    int insertSelective(Employee record);

    Employee selectByPrimaryKey(String employeeid);

    int updateByPrimaryKeySelective(Employee record);

    int updateByPrimaryKey(Employee record);

    @Select("select employeeid, password, realname, sex, birthday, identitycard, state from employee where state=#{one}")
    List<Employee> getAllEmploy(Integer one);

    @Select("select employeeid, realname, sex, birthday, identitycard, phone,state as estate from employee")
    List<AdminMangeEmployVO> getEmploy();

}